package com.gm.census.model.pojo;

import javax.persistence.Id;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.gm.census.model.UserInfo;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.NotSaved;

public class User implements UserInfo {

	@Id
	String id;
	String name;
	String email;
	@NotSaved
	Congregation congregation;
	@JsonIgnore
	Key<Congregation> congregationId;
	String phone;

	public User() {
		super();
	}

	public User(String id, String name, String email,
			Congregation congregation, String phone) {
		this();
		this.id = id;
		this.name = name;
		this.email = email;
		this.congregation = congregation;
		this.phone = phone;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#getName()
	 */
	@Override
	public String getName() {
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#setName(java.lang.String)
	 */
	@Override
	public void setName(String name) {
		this.name = name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#getEmail()
	 */
	@Override
	public String getEmail() {
		return email;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#setEmail(java.lang.String)
	 */
	@Override
	public void setEmail(String email) {
		this.email = email;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#getCongregation()
	 */
	@Override
	public Congregation getCongregation() {
		return congregation;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#setCongregation(java.lang.String)
	 */
	@Override
	public void setCongregation(Congregation congregation) {
		this.congregation = congregation;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#getPhone()
	 */
	@Override
	public String getPhone() {
		return phone;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.gm.census.model.UserInfo#setPhone(java.lang.String)
	 */
	@Override
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Key<Congregation> getCongregationId() {
		return congregationId;
	}

	public void setCongregationId(Key<Congregation> congregationId) {
		this.congregationId = congregationId;
	}

}